<?php
require __DIR__ . '/conf.php';
require __DIR__ .'/vendor/myphps/myphp/base.php';


$ipList = UdpIpDetect::localIp(false);
$ip_list = [];
if(count($ipList)>1){
    foreach ($ipList as $ip){
        $ip_list = array_merge($ip_list, UdpIpDetect::broadCast('REPORT_IP', 51024, $ip));
    }
}else{
    $ip_list = UdpIpDetect::broadCast('REPORT_IP',51024);
}

echo "探测到".count($ip_list)."个新数据源",PHP_EOL;
echo implode(PHP_EOL, array_keys($ip_list)),PHP_EOL;